home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / arexx / rexxbgui / testreq.rexx < prev   
OS/2 REXX Batch file  |  1999-06-14  |  623b  |  32 lines

  1. /* REXX script for rexxbgui.library: test requesters */
  2.  
  3. if ~show('l','rexxbgui.library') then do
  4.     if ~addlib('rexxbgui.library',0,-30) then do
  5.         exit(20)
  6.     end
  7.     else nop
  8. end
  9. else nop
  10.  
  11. call bguiopen() /* causes error 12 if it did not work */
  12. /* supply a second argument for a '0' return code instead of an ARexx
  13.    error */
  14.  
  15. signal on syntax /* important: bguiclose() MUST be called */
  16. signal on halt
  17. signal on break_c
  18.  
  19. say bguireq('Test BGUI requester',arg(1))
  20. rc=0
  21.  
  22. syntax:
  23. if rc~=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
  24. call bguiclose()
  25. exit 0
  26.  
  27. break_c:
  28. halt:
  29. rc=0
  30. say '+++ Break at line' sigl
  31. signal syntax
  32.